#ifndef CLIENT_H
#define CLIENT_H

#include <QWidget>
#include <QStackedWidget>
#include <QtWidgets/QMainWindow>
#include "ui_client.h"
#include <QMovie>
#include <QPixmap>
#include <QTableWidget>
#include <QHeaderView>
#include <QHBoxLayout>
#include <QPushButton>
#include <QDebug>
#include <QListWidget>
#include <./poco/sale/saleSetMeal.h>


namespace Ui {
class client;
}

class client : public QWidget
{
    Q_OBJECT
signals:
    //自定义的菜单选择函数
    //void mySignal(QTableWidget*);
public:
    explicit client(QWidget *parent = nullptr);
    ~client();
    //int init(QTableWidget*);//初始化表格
    int init();//初始化list
    //int initlist(QTableWidget*);
    //void addOrder();
    struct myOrder{
        int x;
        int y;
    };
    QVector<myOrder> myorders;

    vector<int> nums;//每个食物类型对应的数量
    vector<FoodType> foodTypes;//食物类型

public slots:
    void addOrder();


//private slots:
    //void on_label_2_linkActivated(const QString &link);
    //void addOrder(QTableWidget*);//button响应函数
    //void addOrder();

private slots:
    //确认订单


    void on_pushButton_clicked();

public:
    void setSales(SaleSetMeal* setMeal__)
    {
        setMeal=setMeal__;
        aviliableNum=setMeal__->nums;
    }
protected:
    SaleSetMeal *setMeal;
    vector<int> aviliableNum;

private:
    Ui::client *ui;
    QListWidget *list;
    //QTableWidget *table;
//    QTableWidget *table2;
//    QTableWidget *table3;
    //QPushButton *bt;
};

#endif // CLIENT_H
